import { useEffect, useRef } from "react";

function App() {
    const input = useRef(null);

    useEffect(() => {
        input.current.focus()
        console.log(input);
    }, [])

    return (
        <div>
            <input type="text" ref={input} />
        </div>
    )
}
export default App;